Skip to content

Conversation

@Treggats
Copy link
Contributor

fixes #1427

Main changes

  • added json assertions on the TestResponseHelper;
    • assertJson()
    • assertJsonByKeys()
    • assertHasJsonValidationError()
    • 'assertHasNoJsonValidationErrors()`
  • added post route for books

Secondary changes

  • added a refresh method to refresh a model after it was updated
  • organised the Request classes

@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch 4 times, most recently from 6f7c40f to 5939045 Compare July 25, 2025 14:53
@Treggats Treggats marked this pull request as ready for review July 25, 2025 14:55
@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch 3 times, most recently from 97b232f to ddb903e Compare July 27, 2025 09:51
@innocenzi innocenzi requested a review from brendt July 28, 2025 08:49
@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch 2 times, most recently from 17af070 to d7293d3 Compare July 28, 2025 09:31
@Treggats Treggats requested a review from innocenzi July 28, 2025 09:32
@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch from a288e20 to 785d5fe Compare July 28, 2025 17:35
@brendt
Copy link
Member

brendt commented Jul 29, 2025

I like it! A couple of small remarks to solve, but this will be really useful

@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch from 785d5fe to 239c918 Compare July 29, 2025 12:09
Treggats added 2 commits July 29, 2025 18:51
There was a `tests/Fixtures/Requests` directory, made sense to move the Request classes there.
@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch 3 times, most recently from d07fd96 to d7fe656 Compare July 29, 2025 23:42
@Treggats Treggats requested a review from brendt July 29, 2025 23:43
@Treggats Treggats force-pushed the feature/add-assertJsonByKeys-assertion branch from d7fe656 to 18e6f3d Compare July 29, 2025 23:47
@brendt brendt merged commit 754a657 into tempestphp:main Jul 30, 2025
73 checks passed
@brendt
Copy link
Member

brendt commented Jul 30, 2025

Thanks! Nice PR :)

@Treggats Treggats deleted the feature/add-assertJsonByKeys-assertion branch July 30, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tests): add json/array assertions onto the TestResponseHelper

3 participants